Fix linux gateway first start#1378
Conversation
|
Thank you for your submission! We ask that you sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text: I have read the DCO document and I hereby sign the DCO. You can retrigger this bot by commenting recheck in this Pull Request. Posted by the DCO Assistant Lite bot. |
|
Thank you for your interest in contributing to OpenShell, @pragmaxim. This project uses a vouch system for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer. To get vouched:
See CONTRIBUTING.md for details. |
|
I have more commits, but they don't show up as the PR is closed |
|
I think we'll be able to fix this with #1274 |
|
Hopefully, I fixed 3-4 issues on the way to make it work on Ubuntu. |
Fixes #1377
Summary
This change makes the packaged Linux gateway start correctly from a fresh install and makes the source plaintext gateway path usable with Podman.
The main failure was in first-start configuration. The gateway requires an SSH handshake secret, but the packaged systemd services relied on an environment file that may be generated during startup. systemd reads
EnvironmentFilebefore the service start command runs, so a newly generated file is not visible to the first gateway process unless the required value is explicitly passed along.What This Changes
The Linux systemd startup path now has a small helper that ensures the gateway environment file exists, exports the generated SSH handshake secret when systemd has not already loaded one, and then executes the gateway.
The helper is intentionally narrow. It does not source the full user configuration file, so normal
EnvironmentFileoverride behavior stays under systemd. It only bridges the first-start gap for the required secret.The Debian package now installs the same bootstrap pieces that the service expects, and Debian/RPM package behavior is aligned around the Linux gateway default port
8080.The Debian service is also configured as a Podman-backed user service. It binds on an address reachable from sandbox containers, leaves the gRPC callback endpoint unset so the Podman driver can derive the
host.containers.internalcallback endpoint, and includes certificate SANs needed for that callback.The source plaintext gateway path now supplies the required SSH handshake secret and uses Podman-compatible defaults when Podman is selected.
Compatibility
8080.EnvironmentFile.Validation
Validated with: